import type { App } from 'vue'
import {
  Button,
  Tabbar,
  TabbarItem,
  TreeSelect,
} from 'vant'
import 'vant/lib/index.css'

const baseComponentList = [
  Button,
  Tabbar,
  TabbarItem,
  TreeSelect,
]

function registerComponent(app: App) {
  baseComponentList.forEach((component) => {
    app.use(component)
  })
}

export function install(app: App) {
  registerComponent(app)
}
